package com.turing.customer.feign;

import com.alibaba.fastjson.JSONObject;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PatchMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;
import result.Result;

@FeignClient("merchant-server")
public interface MerchantService {

    /**
     * 管理员列表(手机)
     * @return
     */
    @GetMapping("merchant/admin/adminList")
    Result adminList(
            @RequestParam(value = "merchantId") String merchantId,
            @RequestParam(value = "cusNickname",required = false) String cusNickname,
            @RequestParam(value = "cusInfo",required = false) String cusInfo,
            @RequestParam(value = "sortType",defaultValue = "0") Integer sortType,
            @RequestParam(value = "orderType",defaultValue = "0") Integer orderType,
            @RequestParam(value = "pageNum",required = false) Integer pageNum,
            @RequestParam(value = "pageSize",required = false) Integer pageSize
    );

    /**
     * 商家详情(PC)
     */
    @GetMapping("merchant/mer/getMerById")
    Result getMerById(@RequestParam(value = "id") String id);

    /**
     * 修改商家
     */
    @PatchMapping("merchant/mer/merEdit")
    Result merEdit(@RequestBody JSONObject jsonObject);

}
